<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\Transactions
 *
 * @ORM\Table(name="transactions")
 * @ORM\Entity
 */
class Transactions
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer $moneyCount
     *
     * @ORM\Column(name="money_count", type="integer", nullable=false)
     */
    private $moneyCount;

    /**
     * @var string $transaction
     *
     * @ORM\Column(name="transaction", type="string", length=64, nullable=false)
     */
    private $transaction;

    /**
     * @var datetime $createdAt
     *
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
     */
    private $createdAt;

    /**
     * @var Catalog\Users
     *
     * @ORM\ManyToOne(targetEntity="Catalog\Users")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    private $user;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set moneyCount
     *
     * @param integer $moneyCount
     * @return Transactions
     */
    public function setMoneyCount($moneyCount)
    {
        $this->moneyCount = $moneyCount;
        return $this;
    }

    /**
     * Get moneyCount
     *
     * @return integer 
     */
    public function getMoneyCount()
    {
        return $this->moneyCount;
    }

    /**
     * Set transaction
     *
     * @param string $transaction
     * @return Transactions
     */
    public function setTransaction($transaction)
    {
        $this->transaction = $transaction;
        return $this;
    }

    /**
     * Get transaction
     *
     * @return string 
     */
    public function getTransaction()
    {
        return $this->transaction;
    }

    /**
     * Set createdAt
     *
     * @param datetime $createdAt
     * @return Transactions
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
        return $this;
    }

    /**
     * Get createdAt
     *
     * @return datetime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set user
     *
     * @param Catalog\Users $user
     * @return Transactions
     */
    public function setUser(\Catalog\Users $user = null)
    {
        $this->user = $user;
        return $this;
    }

    /**
     * Get user
     *
     * @return Catalog\Users 
     */
    public function getUser()
    {
        return $this->user;
    }
}